
import socket
#服务器端
while 1:
    s = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
    s.bind(('127.0.0.1',8001))
    s.listen()
    conn,addres=s.accept()
    data=conn.recv(1024)
    print(data.decode())
    conn.sendall(("服务器已接收到内容"+str(data.decode())).encode())
    s.close()
